#单个异常
try:
    i = int(input('数字:'))
    result =1/i
    print(result)
except ValueError as e:  #要找到对的错误信息才会打印as e
    print(e)


# #多个异常
# try:
#     i = int(input('数字:'))
#     result = 1 / i
# except(ZeroDivisionError, ValueError, NameError) as e:
#     print(e)